package com.example.demo.enity;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
public class Student implements Serializable {
    private Integer id;
    private String name;
    private Double score;
    private Date birthday;

    public static List<Student> getStudents(){
        List<Student> students=new ArrayList<>();
        students.add(new Student(1,"李铭晗",98.0,new Date()));
        students.add(new Student(2,"伍六七",85.0,new Date()));
        students.add(new Student(3,"何大春",98.5,new Date()));
        students.add(new Student(4,"梅花十三",98.5,new Date()));
        return students;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", score=" + score +
                ", birthday=" + birthday +
                '}';
    }
}
